export default function (selector) {
    return new Promise((resolve)=>{
         // 获取组件/图片高度
      const query = wx.createSelectorQuery()
      query.select(selector).boundingClientRect()
      query.exec(res => {
        resolve(res)
      }) 
      //简写方式
    //   query.exec(resolve)
    })
     
}